-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(integration-test): use dapp-offer-up as target for getting-start… #8829
Conversation
4e586f5
to
e9623c8
Compare
b739682
to
e72b3b1
Compare
aa2f3e7
to
2b940b8
Compare
); | ||
clearInterval(ival); | ||
|
||
// Test that the Node.js `-r esm`-dependent plugin works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remark
I don't know what these ESM plugin tests are about so I removed them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can forget about resm-plugin
detached: true, | ||
}); | ||
// yarn start:ui | ||
const uiStartP = yarn(['start:ui']); | ||
finalizers.push(() => pkill(uiStartP.childProcess, 'SIGINT')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question
I don't know if I need to add finalizers for other yarn
commands above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM.
I don't know the dapp-offer-up well enough to approve that this covers it so I'll leave Approve to @dckc
); | ||
clearInterval(ival); | ||
|
||
// Test that the Node.js `-r esm`-dependent plugin works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can forget about resm-plugin
clearTimeout(to); | ||
}; | ||
// TODO: use abci_info endpoint to get block height | ||
// sleep for 180 seconds for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment will be stale if someone changes the constant.
// sleep for 180 seconds for now | |
// sleep to let contract start |
("for now" is implied by the TODO)
t.is(done, 0, `deploy ${deployCmd.join(' ')} successful before timeout`); | ||
clearTimeout(to); | ||
}; | ||
// TODO: use abci_info endpoint to get block height |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider an XXX comment since this is tech debt, but not necessarily something we plan to fix. (unless you do)
https://github.com/Agoric/agoric-sdk/wiki/Coding-Style#code-comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should start with yarn create ...
rather than agoric init ...
...initOptions, | ||
'dapp-foo', | ||
]), | ||
await myMain(['init', ...initOptions, 'dapp-foo']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of last Christmas, getting started no longer uses the agoric
CLI.
This step should probably be yarn create @agoric/dapp --dapp-template dapp-offer-up dapp-foo
@@ -57,7 +57,7 @@ jobs: | |||
# Prerequisites | |||
- uses: ./.github/actions/restore-node | |||
with: | |||
node-version: 16.x | |||
node-version: 18.18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the getting started test still clones agoric-sdk. That's no longer part of the workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still need to clone agoric-sdk, because with yarn create @agoric/dapp ...
we're implicitly testing the behavior of init
subcommand of agoric-cli package: https://github.com/Agoric/agoric-sdk/blob/master/packages/agoric-cli/src/main.js#L124-L140
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual testing has confirmed that we don't need to clone agoric-sdk. yarn create @agoric/dapp
gets code to run agoric init
from npm, not from an agoric-sdk clone. I sure hope we can do likewise in ci.
This ci job says something about a local registry. That's perhaps the way yarn create @agoric/dapp ...
gets access to the code under test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ci job says something about a local registry. That's perhaps the way yarn create @agoric/dapp ... gets access to the code under test.
Yeah I think we start a local NPM registry before running getting-started tests and we publish via a CI specific tag here.
...actually I'm not so sure anymore, just pushed a debug commit to weed out what's using local code and what's using npmjs.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I just confirmed that yarn create @agoric/dapp ...
will always pull from npmjs.com and I was not able to find a way to make it pull from local registry with my very limited yarn knowledge. I also confirmed that agoric init ...
will use the local registry and code.
Here's what I propose:
- in agoric-sdk repo, we use
agoric init ...
to initializedapp-offer-up
(this PR)- this way, we ensure integration tests in agoric-sdk repo are testing the behavior of
agoric init ...
at git HEAD, for example, if I changeDEFAULT_DAPP_TEMPLATE
to something erroneous, integration tests will fail right away - merging this PR would also unblock @turadg's PRs to deprecate support for node 16, add support for node 20, and migrate from yarn classic to yarn modern
- this way, we ensure integration tests in agoric-sdk repo are testing the behavior of
- in dapp-offer-up repo, we use
yarn create @agoric/dapp ...
to initializedapp-offer-up
followed by integration tests- this way, we ensure integration tests in dapp-offer-up repo are testing the behavior of
agoric init ...
that's published on npmjs.com - this work is not scheduled, and IMO is not high priority
- this way, we ensure integration tests in dapp-offer-up repo are testing the behavior of
@dckc sounds like a plan?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. sounds good.
t.is( | ||
await myMain(['init', ...initOptions, 'dapp-foo']), | ||
await yarn(['create', '@agoric/dapp', 'dapp-foo']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs include --dapp-template dapp-offer-up
options. Maybe those are no longer necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's no longer necessary because #8630 is merged in and released as part of upgrade-14
e48e0b5
to
d1d4d6d
Compare
d1d4d6d
to
794d8fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onward
Just realized that I meant to choose |
…ed test
closes: #8381
Description
This PR uses
dapp-offer-up
in our CI job and (intends to) fix the tests associated with itTesting Considerations
Gonna make integration tests pass again